Reputation: 4430
I have a problem when creating link for "SEO-Friendly" when using the WooCommerce plugin on Wordpress.
In Setting -> General -> Permalinks.
in this setting:
Common Setting: Post Name. Optional: don't have anything change. Product permalinks: Default.
When I added the new product, I click on this link to the product. URL show like that:
http://localhost/ducloc/product/banh-trang-nuong-nam-bo/
Example my product has the name: banh-trang-nuong-nam-bo
.
But it shows error like:
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Image for setting in Permalinks:
Image for error when go to URL of Product:
Update: My .htaccess
:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ducloc/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ducloc/index.php [L]
</IfModule>
# END WordPress
Upvotes: 0
Views: 75
Reputation: 27523
Apache configuration file
ubuntu -> /etc/apache2/apache2.conf
arch -> /etc/httpd/conf/httpd.conf
Add mod_rewrite and .htaccess support for your site At the end of the configuration files add these lines:
#My site mod_rewrite configuration
<Directory "/ABSOLUTE/PATH/YourSite">
AllowOverride All
</Directory>
Enable mod_rewrite
ubuntu: sudo a2enmod rewrite
arch: Uncomment, in apache configuration file, the line LoadModule rewrite_module modules/mod_rewrite.so
Restart apache
ubuntu: sudo service apache2 restart
arch: sudo systemctl restart httpd
use this following settings for your arch linux
Upvotes: 1