MyBB Community Forums

Full Version: .htaccess file. settings for Google Seo plugging
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can i set Google Seo plugging,my forums are reporting 404 not found, they wont open, i need help with this
It tells you what you have to do. Find your .htaccess file in your root directory and add the lines that the plugin gives you. You may have to enable "Show Hidden Files" depending on what type of hosting you're on.
(2018-07-18, 11:19 PM)bigchief Wrote: [ -> ]How can i set Google Seo plugging,my forums are reporting 404 not found, they wont open, i need help with this

Here's how I have my .htaccess files setup for Google SEO. (note the 3rd line, part of it is X'd out)

Please review the screenshot below this code.

SubstituteMaxLineLength 20M
LimitRequestBody 99999999999
SetEnv PHPRC /xxxxxxxx/xxxxxxxx/public_html/php.ini → (root folders have been X'd out for security reasons. Replace X's with name of your root folder)
#Always redirect to https://luxorforums.com/
RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([^&]*)&(.*)$ https://luxorforums.com/$1?$2 [L,QSA,R=301]

# Google SEO 404:
ErrorDocument 404 /misc.php?google_seo_error=404

# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

# Google SEO URL Forums:
RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

# Google SEO URL Threads:
RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

# Google SEO URL Announcements:
RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

# Google SEO URL Users:
RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

# Google SEO URL Calendars:
RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

# Google SEO URL Events:
RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

Options -MultiViews +FollowSymlinks -Indexes


[Image: 8228ae62b082f487e0637af264a9e209.png]
(2018-07-19, 12:16 AM)Wires Wrote: [ -> ]It tells you what you have to do. Find your .htaccess file in your root directory and add the lines that the plugin gives you. You may have to enable "Show Hidden Files" depending on what type of hosting you're on.

am working on wamp server now, will upload it later.
am i suppose to paste the lines at the end of the document or any particular place and where can i find "Show Hidden Files"

(2018-07-19, 12:27 AM)Serpius Wrote: [ -> ]
(2018-07-18, 11:19 PM)bigchief Wrote: [ -> ]How can i set Google Seo plugging,my forums are reporting 404 not found, they wont open, i need help with this

Here's how I have my .htaccess files setup for Google SEO. (note the 3rd line, part of it is X'd out)

Please review the screenshot below this code.

SubstituteMaxLineLength 20M
LimitRequestBody 99999999999
SetEnv PHPRC /xxxxxxxx/xxxxxxxx/public_html/php.ini → (root folders have been X'd out for security reasons. Replace X's with name of your root folder)
#Always redirect to https://luxorforums.com/
RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([^&]*)&(.*)$ https://luxorforums.com/$1?$2 [L,QSA,R=301]

# Google SEO 404:
ErrorDocument 404 /misc.php?google_seo_error=404

# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

# Google SEO URL Forums:
RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

# Google SEO URL Threads:
RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

# Google SEO URL Announcements:
RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

# Google SEO URL Users:
RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

# Google SEO URL Calendars:
RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

# Google SEO URL Events:
RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

Options -MultiViews +FollowSymlinks -Indexes


[Image: 8228ae62b082f487e0637af264a9e209.png]

Thank you so much, should i copy this settings to the .htaccess, and what should i change at the configuration page
(2018-07-19, 07:48 AM)bigchief Wrote: [ -> ]
(2018-07-19, 12:16 AM)Wires Wrote: [ -> ]It tells you what you have to do. Find your .htaccess file in your root directory and add the lines that the plugin gives you. You may have to enable "Show Hidden Files" depending on what type of hosting you're on.

am working on wamp server now, will upload it later.
am i suppose to paste the lines at the end of the document or any particular place and where can i find "Show Hidden Files"

(2018-07-19, 12:27 AM)Serpius Wrote: [ -> ]
(2018-07-18, 11:19 PM)bigchief Wrote: [ -> ]How can i set Google Seo plugging,my forums are reporting 404 not found, they wont open, i need help with this

Here's how I have my .htaccess files setup for Google SEO. (note the 3rd line, part of it is X'd out)

Please review the screenshot below this code.

SubstituteMaxLineLength 20M
LimitRequestBody 99999999999
SetEnv PHPRC /xxxxxxxx/xxxxxxxx/public_html/php.ini → (root folders have been X'd out for security reasons. Replace X's with name of your root folder)
#Always redirect to https://luxorforums.com/
RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([^&]*)&(.*)$ https://luxorforums.com/$1?$2 [L,QSA,R=301]

# Google SEO 404:
ErrorDocument 404 /misc.php?google_seo_error=404

# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

# Google SEO URL Forums:
RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

# Google SEO URL Threads:
RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

# Google SEO URL Announcements:
RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

# Google SEO URL Users:
RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

# Google SEO URL Calendars:
RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

# Google SEO URL Events:
RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

Options -MultiViews +FollowSymlinks -Indexes


[Image: 8228ae62b082f487e0637af264a9e209.png]

Thank you so much, should i copy this settings to the .htaccess, and what should i change at the configuration page

You will need to change https://luxorforums.com to whatever your website URL is. 
There are 2 instances of my website being stated in the .htaccess file. 
Also, change the root folder to match your root folder in the 3rd line where I have it X'd out.
Change those and you should be good.
(2018-07-19, 11:57 AM)Serpius Wrote: [ -> ]
(2018-07-19, 07:48 AM)bigchief Wrote: [ -> ]
(2018-07-19, 12:16 AM)Wires Wrote: [ -> ]It tells you what you have to do. Find your .htaccess file in your root directory and add the lines that the plugin gives you. You may have to enable "Show Hidden Files" depending on what type of hosting you're on.

am working on wamp server now, will upload it later.
am i suppose to paste the lines at the end of the document or any particular place and where can i find "Show Hidden Files"

(2018-07-19, 12:27 AM)Serpius Wrote: [ -> ]
(2018-07-18, 11:19 PM)bigchief Wrote: [ -> ]How can i set Google Seo plugging,my forums are reporting 404 not found, they wont open, i need help with this

Here's how I have my .htaccess files setup for Google SEO. (note the 3rd line, part of it is X'd out)

Please review the screenshot below this code.

SubstituteMaxLineLength 20M
LimitRequestBody 99999999999
SetEnv PHPRC /xxxxxxxx/xxxxxxxx/public_html/php.ini → (root folders have been X'd out for security reasons. Replace X's with name of your root folder)
#Always redirect to https://luxorforums.com/
RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([^&]*)&(.*)$ https://luxorforums.com/$1?$2 [L,QSA,R=301]

# Google SEO 404:
ErrorDocument 404 /misc.php?google_seo_error=404

# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

# Google SEO URL Forums:
RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

# Google SEO URL Threads:
RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

# Google SEO URL Announcements:
RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

# Google SEO URL Users:
RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

# Google SEO URL Calendars:
RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

# Google SEO URL Events:
RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

Options -MultiViews +FollowSymlinks -Indexes


[Image: 8228ae62b082f487e0637af264a9e209.png]

Thank you so much, should i copy this settings to the .htaccess, and what should i change at the configuration page

You will need to change https://luxorforums.com to whatever your website URL is. 
There are 2 instances of my website being stated in the .htaccess file. 
Also, change the root folder to match your root folder in the 3rd line where I have it X'd out.
Change those and you should be good.

am still struggling with this problem....should i enclose this setting with <IfModule></IfModule> or where exactly am i suppose to dumb it at in the htaccess